﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Web.Mvc;

using Mvc.XForms.Controls.Formatters;
using Mvc.XForms.Utilities;

namespace Mvc.XForms.Controls {
	public class XFormViewUserControl<TModel, TContext> : ViewUserControl<TModel> where TModel : class {
		private IContext<TContext> xfContext;

		public IContext<TContext> XFContext {
			get {
				if (xfContext == null)
					xfContext = (IContext<TContext>)ViewData["XFormContext"];
				return xfContext;
			}
		}
	}
}
